package CollectionsOfTool;

import java.util.ArrayList;
import java.util.Collections;

public class CollectionsLearn {
    public static void main(String[] args) {
        /*
        public static <T> boolean addAll(Collection<T> c,T... elements>  批量添加元素
        public static void shuffle(List<?> list)  打乱List集合的顺序
         */

        //批量添加元素

        ArrayList<String>  list =new ArrayList<>();

        //批量添加元素
        Collections.addAll(list,"ada","asfd","asas","ahs","hss");

        System.out.println(list);

        //打乱
        Collections.shuffle(list);
        System.out.println(list);
    }
}
